package com.nicefact.core;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class ApplicationContextProvider implements ApplicationContextAware {
     private static ApplicationContext applicationContext = null;

      public static ApplicationContext getApplicationContext() {
          return applicationContext;
      }
      public void setApplicationContext(ApplicationContext context) throws BeansException {
            // Assign the ApplicationContext into a static variable
    	  	applicationContext = context;
      }
}